import React from 'react';
import ReactDOM from 'react-dom';
import Consumer  from './app';
export default class Son extends React.Component { 

  render() { 
    return (
    <Consumer>
        { 
            (data)=>{ 
                return (
                    <div onClick={()=>data.add(100)}>我是son组件-{data.num}, {data.other}</div>
                )
            } 
        }
    </Consumer>)
  } 
} 